package com.jt.www.admin.stats.controller;

import com.jt.www.admin.stats.service.EduCaseService;
import com.jt.www.model.reps.ResultDTO;
import com.jt.www.model.vo.stats.caseage.CaseAgeParamVo;
import com.jt.www.model.vo.stats.caseledger.CaseLedgerParamVo;
import com.jt.www.model.vo.stats.casepay.CasePayRateParamVo;
import com.jt.www.model.vo.stats.casesummary.CaseSummaryParamVo;
import com.jt.www.model.vo.stats.reportschema.ReportSchemaParamVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author admin_ltf
 * @create 2019-05-15 13:58
 */
@Api(value = "教育案件", tags = {"EDU-CASE-API"}, description = "教育案件")
@RestController
@RequestMapping(value = "/stats/case")
public class EduCaseController {

    public static final Logger log = LoggerFactory.getLogger(EduCaseController.class);

    @Autowired
    EduCaseService eduCaseService;

    /**
     * 案件汇总统计
     *
     * @param vo
     * @return
     */
    @ApiOperation(value = "案件汇总统计", notes = "案件汇总统计", httpMethod = "POST")
    @PostMapping(value = "/getCaseSummaryInfo")
    public ResultDTO<Map<String, Object>> searchCaseSummaryInfo(@RequestBody(required = false) CaseSummaryParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchCaseSummaryInfo(vo);

        return resultMap;
    }


    /**
     * 案件赔付率统计
     *
     * @param vo
     * @return
     */
    @ApiOperation(value = "案件赔付率统计", notes = "案件赔付率统计", httpMethod = "POST")
    @PostMapping(value = "/getCasePayRate")
    public ResultDTO<Map<String, Object>> searchCasePayRate(@RequestBody(required = false) CasePayRateParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchCasePayRate(vo);

        return resultMap;
    }

    //      CaseAgeParamVo   CaseAgeReportResultVo  CaseAgeServiceResultVo
    @ApiOperation(value = "案件时效明细表江泰", notes = "案件时效明细表江泰", httpMethod = "POST")
    @PostMapping(value = "/getCaseAgeReport")
    public ResultDTO<Map<String, Object>> searchCaseAgeReport(@RequestBody(required = false) CaseAgeParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchCaseAgeReport(vo);

        return resultMap;
    }

    @ApiOperation(value = "案件时效明细表服务提供人", notes = "案件时效明细表服务提供人", httpMethod = "POST")
    @PostMapping(value = "/getCaseAgeService")
    public ResultDTO<Map<String, Object>> searchCaseAgeService(@RequestBody(required = false) CaseAgeParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchCaseAgeService(vo);

        return resultMap;
    }


    //    案件台账报表  CaseLedgerResultVO
    @ApiOperation(value = "案件台账报表", notes = "案件台账报表", httpMethod = "POST")
    @PostMapping(value = "/getCaseLedger")
    public ResultDTO<Map<String, Object>> searchCaseLedger(@RequestBody(required = false) CaseLedgerParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchCaseLedger(vo);

        return resultMap;
    }


    //    报表图示
    @ApiOperation(value = "报表图示-报案", notes = "报表图示-报案", httpMethod = "POST")
    @PostMapping(value = "/getReportSchemaBa")
    public ResultDTO<Map<String, Object>> searchReportSchemaInfoBa(@RequestBody(required = false) ReportSchemaParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchReportSchemaInfoBa(vo);

        return resultMap;
    }

    @ApiOperation(value = "报表图示-受伤/死亡", notes = "报表图示-受伤/死亡", httpMethod = "POST")
    @PostMapping(value = "/getReportSchemaSS")
    public ResultDTO<Map<String, Object>> searchReportSchemaInfoSS(@RequestBody(required = false) ReportSchemaParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchReportSchemaInfoSS(vo);

        return resultMap;
    }

    @ApiOperation(value = "报表图示-事故类型", notes = "报表图示-事故类型", httpMethod = "POST")
    @PostMapping(value = "/getReportSchemaSG")
    public ResultDTO<Map<String, Object>> searchReportSchemaInfoSG(@RequestBody(required = false) ReportSchemaParamVo vo) {

        ResultDTO resultMap = eduCaseService.searchReportSchemaInfoSG(vo);

        return resultMap;
    }


}
